<?php
/**
 * CEOfox
 *
 * @copyright  Copyright 2011-2012 CEOfox, Inc.
 * @license    http://ceofox.com/pages/license
 * @version    $Id: browse.class.php 87084 2013-05-24 09:40:17 $
 * @author     CEOfox, Inc.
 */
?>
<?php
defined('PHPFOX') or exit('NO DICE!');
class Follow_Service_Browse extends Phpfox_Service
{
    public function __construct()
    {
        $this->_sTable = phpfox::getT('follow');
    }

    public function query()
    {
        $this->database()->select('b.item_id, ')
                        ->leftJoin(Phpfox::getT('follow_block'), 'b', 'b.user_id = follow.user_id');
  
    }

    public function getQueryJoins($bIsCount = false, $bNoQueryFriend = false)
    {
        /*if (Phpfox::isModule('friend') && Phpfox::getService('friend')->queryJoin($bNoQueryFriend))
        {
            $this->database()->join(Phpfox::getT('friend'), 'friends', 'friends.user_id = newspaper.user_id AND friends.friend_user_id = ' . Phpfox::getUserId());    
        }
        $this->database()->select('lik.like_id AS is_liked, ')
                        ->leftJoin(Phpfox::getT('like'), 'lik', 'lik.type_id = \'newspaper\' AND lik.item_id = newspaper.newspaper_id AND lik.user_id = ' . Phpfox::getUserId());*/
        //$this->database()->select('b.*, ')->leftJoin(Phpfox::getT('follow_block'),'b',' b.user_id = follow.user_id OR follow.follower_id = b.user_id ');
        //$this->database()->leftJoin(phpfox::getT('user'),'u','u.user_id = follow.user_id');

    }
}
?>
